/*
 * COPYRIGHT. ShenZhen iByte Technology Co., Ltd. 2018.
 * ALL RIGHTS RESERVED.
 *
 * No part of this publication may be reproduced, stored in a retrieval system, or transmitted,
 * on any form or by any means, electronic, mechanical, photocopying, recording, 
 * or otherwise, without the prior written permission of ShenZhen iByte Network Technology Co., Ltd.
 *
 * Amendment History:
 * 
 * Date                   By              Description
 * -------------------    -----------     -------------------------------------------
 * Nov 30, 2018    Li.shangzhi         Create the class
 */
package com.github.icloud.elasticsearch.api.docment;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.reindex.DeleteByQueryAction;
import org.junit.Test;
import com.github.icloud.elasticsearch.ElasticsearchClientBase;
/**
 * @FileName DeleteByQuery.java
 * @Description: 
 *
 * @Date Nov 30, 2018 3:04:34 PM
 * @author Li.shangzhi
 * @version 1.0
 */
public class DeleteByQuery extends ElasticsearchClientBase{

	@Test
	public void testForDeleteByQuery() throws Exception {
		DeleteByQueryAction.INSTANCE.newRequestBuilder(client).filter(QueryBuilders.termQuery("status", 1)).execute().actionGet();
		System.out.println("删除成功！");
	}
}
